/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package library.commands;

import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import library.service.ServiceLocator;
import library.service.ServiceLocatorFactory;

/**
 *
 * @author pashtet
 */
public abstract class Command {

    protected final ObjectInputStream input;
    protected final ObjectOutputStream output;
    protected final Socket socket;
    protected ServiceLocator serviceLocator;

    public Command(ObjectInputStream input, ObjectOutputStream output, Socket socket) {
        this.input = input;
        this.output = output;
        this.socket = socket;
        this.serviceLocator = ServiceLocatorFactory.getInstance();
    }

    abstract public void execute() throws Exception;
}
